home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / CRS / crs54.d81 / sgtool13.arc / SID.ARC / SIDMOUSE.C < prev    next >
C/C++ Source or Header  |  1993-08-28  |  721b  |  36 lines

  1. /*
  2. SG C Tools 1.3
  3.  
  4. (C) 1993 Steve Goldsmith
  5. All Rights Reserved
  6.  
  7. Compiled with HI-TECH C 3.09 (CP/M-80).
  8. */
  9.  
  10. #include <hitech.h>
  11. #include <sid.h>
  12.  
  13. extern uchar sidPot1X;
  14. extern uchar sidPot1Y;
  15. extern uchar sidPot2X;
  16. extern uchar sidPot2Y;
  17.  
  18. uchar sidMouse1X = 0;
  19. uchar sidMouse1Y = 0;
  20. uchar sidMouse2X = 0;
  21. uchar sidMouse2Y = 0;
  22.  
  23. /* read 1351 compatible mouse in port 1 and 2 */
  24.  
  25. void getmousesid(void)
  26. {
  27.   if((sidPot1X & 0x01) == 0)
  28.     sidMouse1X = (sidPot1X & 0x7F) >> 1;
  29.   if((sidPot1Y & 0x01) == 0)
  30.     sidMouse1Y = (sidPot1Y & 0x7F) >> 1;
  31.   if((sidPot2X & 0x01) == 0)
  32.     sidMouse2X = (sidPot2X & 0x7F) >> 1;
  33.   if((sidPot2Y & 0x01) == 0)
  34.     sidMouse2Y = (sidPot2Y & 0x7F) >> 1;
  35. }
  36.